public class operator {
    public static void main(String[] args) {
        // &&   ||    !    ^
        // 与   或    非   异或
        /*
            与：有假则假->符号前后有一个为false,结果就是false
            或：有真则真->符号前后有一个为true,结果就是true
            非：取反->符号前的值为true,结果为false,符号前的值为false,结果为true
            异或：相同为false，不同为true
                 true^true --> false
                 true^false --> true
         */
        int i = 10;
        int j = 20;
        int k = 10;
        System.out.println((i==k)&&(i>j));
        System.out.println((i==k)||(i>j));
        System.out.println(!(i==k));
        System.out.println((i==k)^(i>j));

        System.out.println("=============");

        int a = 10;
        int b = 20;
        //boolean ret = (++a > 100) & (++b>100);//21
        boolean ret = (++a > 100) && (++b>100);//20
        System.out.println(ret);
        System.out.println(a);
        System.out.println(b);

        int score = 60;
        String result = score>=60?"及格":"不及格";
        System.out.println(result);

        //比较
        //int a = 10;
        //int b = 20;
        //int c = 10;
        //boolean ret = a==b;
        //System.out.println("a==b的结果为:" + ret);
        //ret = a!=b;
        //System.out.println("a!=b的结果为:" + ret);
        //ret = a>b;
        //System.out.println("a>b的结果为:" + ret);
        //ret = a<b;
        //System.out.println("a<b的结果为:" + ret);
        //ret = a>=b;
        //System.out.println("a>=b的结果为:" + ret);
        //ret = a<=b;
        //System.out.println("a<=b的结果为:" + ret);

        //int i = 10;
        //i+=2;
        //System.out.println(i);
        //
        //int j = 50;
        //j%=3;
        //System.out.println(j);

        //运算符
        //int a = 10;
        //int b = 20;
        //System.out.println(a+b);
        //System.out.println(a-b);
        //System.out.println(a*b);
        //System.out.println(a/b);
        //System.out.println(a%b);

        //int i = 10;
        //int j = 20;
        //System.out.println(i+j);
        //System.out.println(i+j+"");
        //System.out.println(i+""+j);
        //System.out.println(""+i+j);
        //System.out.println(""+(i+j));
        //System.out.println("i+j的结果为:"+(i+j));
        //
        //System.out.println("=====================");
        //
        //int x = 10;
        //x++;
        //System.out.println(x);
        //x--;
        //System.out.println(x);
        //
        //int y = 10;
        //int ret = y++;
        //System.out.println(ret);
        //System.out.println(y);
        //
        //System.out.println("=====================");
        //
        //int a = 10;
        //a = a++;
        //System.out.println(a);
        //System.out.println(a);

    }
}
